package com.dycx.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dycx.system.dto.RegionDTO;
import com.dycx.system.entity.RegionDO;
import com.dycx.system.vo.RegionVO;
import com.dycx.common.vendor.map.vo.gaode.DistrictsVO;

import java.util.List;


public interface RegionService extends IService<RegionDO> {
    Boolean delete(int id);

    Boolean create(RegionDTO regionDto);

    Boolean edit(RegionDTO regionDto);

    /**
     * 根据编码查询
     */
    RegionVO load(int code);

    RegionVO load(String name);

    RegionVO load(String cityName,String districtName, String streetName);

    String[] getRegionIdPath(int code);

    List<RegionVO> getRegionPath(int code);

    String getRegionDetailName(Integer code, String joinStr);

    List<RegionVO> getChildList(Integer parentCode);

    void syncAMapData(List<DistrictsVO> regionList, Integer parentId);

    <T> T replenish(T object);

    Boolean cacheRegion(String level);

}
